import request from '@/utils/request'

// 查询配件配置列表
export function listFitting(query) {
  return request({
    url: '/storage/fitting/list',
    method: 'get',
    params: query
  })
}

// 查询配件配置详细
export function getFitting(fittingId) {
  return request({
    url: '/storage/fitting/' + fittingId,
    method: 'get'
  })
}

// 新增配件配置
export function addFitting(data) {
  return request({
    url: '/storage/fitting',
    method: 'post',
    data: data
  })
}

// 修改配件配置
export function updateFitting(data) {
  return request({
    url: '/storage/fitting',
    method: 'put',
    data: data
  })
}

// 删除配件配置
export function delFitting(fittingId) {
  return request({
    url: '/storage/fitting/' + fittingId,
    method: 'delete'
  })
}
